This crate provides a procedural attribute macro version of proptest's proptest!
macro.
So instead of having to write:
use proptest;
proptest!
you can write:
use proptest;
Limitations
Procedural attribute macros can only be used with valid Rust syntax, which means that you can't
use proptest's in
operator (which allows you to draw values from a specific strategy
function):
// This won't compile!
)
Instead you must provide an actual parameter list, just like you would with a real Rust
function definition. That, in turn, means that your function parameters can only draw values
using the any
strategy for their types. If you want to use a custom strategy, you must
create a separately named type, and have the new type's Arbitrary
impl use that strategy:
Benefits
The main one is purely aesthetic: since you're applying the proptest
attribute macro to valid
Rust functions, rustfmt
works on them!